package com.us.usws.site.console.action;

import com.us.usws.support.uitls.DataPageUtil;

public class BasePageSearchAction<T> extends BaseAction{

	private static final long serialVersionUID = 5588198492215791530L;
	
	private int page;

	private int limit;

	private int start;
	
	protected DataPageUtil<T> dataPageUtil;
	
	public DataPageUtil<T> createDataPageUtil() {
		if (dataPageUtil == null) {
			dataPageUtil = new DataPageUtil<T>();
			dataPageUtil.setPageNo(getPage());
			dataPageUtil.setPageSize(getLimit());
		}
		return dataPageUtil;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getLimit() {
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
	}

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}
}
